package cn.chinaflame.pagodas.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import cn.chinaflame.pagodas.entity.PaProduct;

public interface PaProductRepository extends JpaRepository<PaProduct, String>, JpaSpecificationExecutor<PaProduct>{

	@Query("select c from PaProduct c where c.productTypeId = ?1 and c.state =0")
	public List<PaProduct> findByProductTypeId(String productTypeId);
	@Query("select c from PaProduct c where c.id=?")
	public PaProduct findProdictById(String id);
}
